<template>
  <el-menu
      default-active="/home"
      class="el-menu-demo"
      mode="horizontal"
      text-color="gray"
      active-text-color="black">
    <el-menu-item index="/home">
      <el-link to="/home">首页</el-link>
    </el-menu-item>
    <el-menu-item index="/restaurant">
      <el-link to="/restaurant">餐厅详情</el-link>
    </el-menu-item>
    <el-menu-item index="/user">
      <el-link to="/user" >用户信息</el-link>
    </el-menu-item>
  </el-menu>
</template>

<script>
import restaurant from "@/components/restaurant.vue";

export default {
  name: 'Navbar',
  computed: {
    restaurant() {
      return restaurant
    }
  },
};
</script>

<style scoped>
.el-menu-demo {
  position: fixed;
  width: 100%;
  z-index: 1000;
  top: 0;
  left: 0;
}
</style>